Replication files for "Accountability for the Local Economy at All Levels of 
Government in United States Elections", Justin de Benedictis-Kessner and 
Christopher Warshaw, APSR

The files in this folder permit replication of the analyses reported by de Benedictis-Kessner and Warshaw.  

In order to replicate our analysis, please run:
(Note that these files will run even if you don't run the data assembly steps below.)
econvoting_counties_analysis.R
econvoting_counties_figures.R
econvoting_counties_maps.R

In order to re-construct our data from their original sources, please run the following files in order:
01-econvoting_counties_datacreation1_economicdata.R
02-econvoting_counties_datacreation2_elections_data.R
03-econvoting_counties_datacreation3_mutate.R


Note 1:
The Harvard dataverse appears to currently limit the size of the zip file you download if you select all files for download to 10 MB. In other words, some of our files might be missing from the download.  In order to replicate our main results using econvoting_counties_analysis.R, make sure you have econ_counties_cities_analysis.Rdata downloaded.  The rest of the data files are unnecessary to replicate the main results.  

Note 2:
We have redacted licensed elections data from all our replication data files. But the data construction code shows users how they could assemble these licensed data to replicate all our results. These redactions include the raw county level election results that we obtained from CQ and Dave Leip from 1991-2015.  However, we have not redacted the delta of the average election results for state and federal offices. So interested users can use the replication data to exactly replicate our main results in Table 3, column 4 and Table 4, column 5. It is also possible to exactly replicate the robustness checks in Tables 5 and 6. It is also possible to exactly replicate Tables 8 and 9.  Other results partially depend on the redacted, licensed data.  

Note 3:
In order for our code to work, the replication folder should have the following subdirectories:
Election_Returns
Economy
geo_overlaps
Media
Figures
Code
Partisan_Control_and_Incumbency
Tables
